Recognizing operational options for stream operators at compile-time

ABSTRACT

A source code that includes an operator graph that includes a plurality of processing elements, each processing element having one or more stream operators is received. A metadata tag describing a customization of at least one of the one or more stream operators having a windowing processing operation is parsed from the source code. The source code of the streaming application having the windowing processing operation based on the metadata tag is compiled.

BACKGROUND

This disclosure generally relates to stream computing, and inparticular, to computing applications that receive streaming data andprocess the data as it is received.

Database systems are typically configured to separate the process ofstoring data from accessing, manipulating, or using data stored in adatabase. More specifically, database systems use a model in which datais first stored and indexed in a memory before subsequent querying andanalysis. In general, database systems may not be well suited forperforming real-time processing and analyzing streaming data. Inparticular, database systems may be unable to store, index, and analyzelarge amounts of streaming data efficiently or in real time.

SUMMARY

Disclosed herein are embodiments of a method of initializing a streamingapplication for execution on one or more compute nodes. In variousembodiments, the method may include receiving a source code thatincludes an operator graph that includes a plurality of processingelements, each processing element having one or more stream operators.In addition, the method may include parsing, from the source code, ametadata tag describing a customization of at least one of the one ormore stream operators having a windowing processing operation.Furthermore, the method may include compiling the source code of thestreaming application having the windowing processing operation based onthe metadata tag.

Also, disclosed herein are embodiments of a system for initializing astreaming application for execution on one or more compute nodes. Invarious embodiments, the system may include a compiler configured toreceive a source code that includes an operator graph that includes aplurality of processing elements, each processing element having one ormore stream operators. In addition, the compiler may also be configuredto parse, from the source code, a metadata tag describing acustomization of at least one of the one or more stream operators havinga windowing processing operation. Furthermore, the compiler may also beconfigured to compile the source code of the streaming applicationhaving the windowing processing operation based on the metadata tag.

Also, disclosed herein are embodiments of computer program product forinitializing a streaming application for execution on one or morecompute nodes. In various embodiments, the computer program product mayreceive a source code that includes an operator graph that includes aplurality of processing elements, each processing element having one ormore stream operators. In addition, the computer program product mayparse, from the source code, a metadata tag describing a customizationof at least one of the one or more stream operators having a windowingprocessing operation. Furthermore, the computer program product maycompile the source code of the streaming application having thewindowing processing operation based on the metadata tag.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates a computing infrastructure configured to execute astream computing application, according to various embodiments.

FIG. 2 illustrates a more detailed view of a compute node of FIG. 1,according to various embodiments.

FIG. 3 illustrates a more detailed view of the management system of FIG.1, according to various embodiments.

FIG. 4 illustrates a more detailed view of the compiler system of FIG.1, according to various embodiments.

FIG. 5 illustrates an operator graph for a stream computing application,according to various embodiments.

FIG. 6 illustrates a method of initializing a streaming application thathas metadata tags for operational options for stream operators,consistent with embodiments of the present disclosure.

Like reference numbers and designations in the various drawings indicatelike elements.

DETAILED DESCRIPTION

Stream-based computing and stream-based database computing are emergingas a developing technology for database systems. Products are availablewhich allow users to create applications that process and querystreaming data before it reaches a database file. With this emergingtechnology, users can specify processing logic to apply to inbound datarecords while they are “in flight,” with the results available in a veryshort amount of time, often in fractions of a second. Constructing anapplication using this type of processing has opened up a newprogramming paradigm that will allow for development of a broad varietyof innovative applications, systems, and processes, as well as presentnew challenges for application programmers and database developers.

In a stream-based computing application, stream operators are connectedto one another such that data flows from one stream operator to the next(e.g., over a TCP/IP socket). Scalability is achieved by distributing anapplication across nodes by creating executables (i.e., processingelements), as well as replicating processing elements on multiple nodesand load balancing among them. Stream operators in a stream computingapplication can be fused together to form a processing element that isexecutable. Doing so allows processing elements to share a commonprocess space, resulting in much faster communication between streamoperators than is available using inter-process communication techniques(e.g., using a TCP/IP socket). Further, processing elements can beinserted or removed dynamically from an operator graph representing theflow of data through the stream computing application.

A “tuple” is data. More specifically, a tuple is a sequence of one ormore attributes associated with an entity. Examples of attributes may beany of a variety of different types, e.g., integer, float, Boolean,string, etc. The attributes may be ordered. A tuple may be extended byadding one or more additional attributes to it. In addition toattributes associated with an entity, a tuple may include metadata,i.e., data about the tuple. As used herein, “stream” or “data stream”refers to a sequence of tuples. Generally, a stream may be considered apseudo-infinite sequence of tuples.

Stream computing applications handle massive volumes of data that needto be processed efficiently and in real time. For example, a streamcomputing application may continuously ingest and analyze hundreds ofthousands of messages per second and up to petabytes of data per day.Accordingly, each stream operator in a stream computing application maybe required to process a received tuple within fractions of a second.

A tuple may be received by a stream operator. In some embodiments, thestream operator may process the tuple after an aggregate of tuples arereceived, e.g., an aggregate stream operator that adds values from oneor more stream operator inputs. An aggregate may be interpreted to meana group of tuples assembled for a particular purpose, according to someembodiments. Furthermore, in some embodiments, the stream operator mayperform partition sorting after tuples are received, e.g., apartitioning stream operator that separates values from one or morestream operator inputs. A partition may be interpreted to mean a groupof tuples sorted for a particular purpose, according to someembodiments.

One or more processing conditions may be defined using windowing,according to some embodiments. A window, as referred to herein, is alogical container for tuples received by an input port of a streamoperator. Windowing may allow for creation of subsets of data within astreaming application. A stream operator may not necessarily supportwindowing by default. A stream operator may, however, be configured tosupport windowing. Both tumbling and sliding windows may store tuplesaccording to various conditions. A tumbling window may store incomingtuples until the window is full, then may trigger a stream operatorbehavior, flush all stored tuples from the window, and then may beginthis process again. Conversely, a sliding window does not automaticallyflush the window when the trigger condition is fulfilled. A slidingwindow also has an eviction policy that tells the window when to flushthe window and begin this process again. These conditions may bereferred to herein as windowing conditions. Windowing conditions may bedefined in any number of ways. For example, an application programmermay define one or more specific windowing conditions. Additionally, thesystem may provide a set of windowing conditions.

Stream computing consists of deploying an application across a multitudeof nodes. Some applications have stream operators that may require moreprocessing time than other stream operators. This may create bottlenecksin the operator graph, limiting the necessary throughput, and not allowan application to satisfy system performance requirements. One option tocombat streaming operators that take more processing time is todistribute the stream operator workload by creating identical streamoperators, segmenting the tuples into multiple substreams, and performthe identical processing operations in parallel. By decreasing theamount of tuples that a stream operator must process, the processingtime is decreased and the bottlenecks may be relieved.

However, creating identical stream operators and splitting a stream intomultiple substreams for identical processing may change the results ofoperations. For example, consider a stock trading application where astream operator calculates the average price of a stock for a group ofcompanies. One tuple may represent an average stock price for onecompany. The workload may be split-up and identical stream operators maybe created, each stream operator calculating the average stock price ofthe tuples it receives. This may lead to multiple average stock pricesbeing calculated, each one not reflecting the true average stock pricefor the group of companies.

Furthermore, the processing of stream operators may be limited by thecapacity of the node or the CPU or CPU's, on which the stream operatoris hosted. If identical stream operators were created, there may be anincreased strain on the CPU of a node, causing an increase in theprocessing time of the stream operators.

To relieve bottlenecks in an operator graph and adhere to thelimitations of the capacity of a node, it may be beneficial for astreaming operator to process a set of tuples at a particular time orafter a particular condition is met. For example, consider a toll boothapplication where one stream operator counts the number of vehicles thatcome through each day. One tuple may represent one vehicle. During rushhour times, there may be a steady stream of vehicles coming through.Therefore, it may be appropriate for the stream operator to count eachtuple as it reaches the stream operator. However, during non-rush hourtimes, the stream of vehicles may be inconsistent and it may be moreappropriate to count the tuples once every hour. By delaying theprocessing operation, the CPU that is used to perform the countingapplication may be deactivated for the stream operator and the CPUresources may be used for other stream operators in the toll boothapplication.

Furthermore, in the toll booth application, another stream operator maybe responsible for counting the amount of money the toll booth receivedin a day. The stream operator may wait until the end of the day to countall the money that was received. However, this may create a bottleneckin the toll booth application because of the processing time requiredfor the streaming application to count all the money. Also, thestreaming application may generate a heavy demand on the CPU during thistime and limit the resources of the CPU to other streaming applications.One possible solution would be to create identical streaming operatorsthat count a subset of the total money collected and then sum the totalstogether. However, the multiple streaming operators may produce a heavydemand on CPU capacity. Another solution may be for the streamingoperator to count the amount received after every 100 vehicles havepassed through the toll booth. This may decrease the processing time thestreaming operator requires at the end of the day and not produce asheavy a demand on the CPU capacity as the multiple streaming operators.

A compiler, i.e., compiler 136, may be directed by metadata tags togenerate customized stream operators in a streaming application withspecifications of how and/or when, to perform their processingoperations. In software applications, a metadata tag may be a keyword orterm assigned to a piece of an information artifact such as a streamingoperator. This kind of metadata may add additional value to theinformation artifact, may help to describe the information artifact, andmay be capable of adding features to an information artifact.

Tagging may be the process of adding comments or labels to something,such as a stream operator. Metadata may be tagged onto a stream operatorusing several different methods. In an embodiment, metadata thatspecifies an operational option may be tagged onto a stream operator byplacing additional statements in the source code of the application. Inanother embodiment, the metadata may be tagged onto a stream operatorthrough the use of annotations to the source code statements.Annotations may instruct an information artifact, such as a streamoperator, to carry out appropriate actions. The annotations may besyntactically distinguishable from the source code and may be omittedfrom the version of the source code that is displayed to a user. In yetanother embodiment, metadata that specifies operational operations forstream operators may be included in a configuration file that isseparate from the source code of the application, but references thesource code.

A compiler, i.e., compiler 136, as shown in FIG. 1, may parse themetadata tags from the source code of a streaming application. Themetadata tags may then direct a compiler, i.e., compiler 136, togenerate stream operators that are configured to support windowprocessing operations, to perform their processing operations in certainway and/or at a certain time, directed by the metadata tag. This mayallow the stream operators to alleviate bottlenecks in a streamingapplication and adhere to the CPU capacity of the compute nodes.

For example, consider a streaming operator that has a tumbling windowand performs an addition operation of values on an aggregate of onincoming tuples. The operator performing the aggregation may alreadyhave a specification of how to manage membership of its tumbling window,and when to produce output from the aggregation. But additionalspecification may be added by metadata tags directing a compiler, i.e.,compiler 136, to generate stream operators that control when theoperator actually performs its addition operations. There may be threepossible window customizations of a stream operator called DP1, DP2, andDP3. In window customization DP1, which may also be referred to as thesingle-tuple operation, the stream operator may add a value from a tupleas it comes in to the aggregate of tuples being stored in the window. Inwindow customization DP2, which may also be referred to as themultiple-tuple operation, the stream operator may wait till five tuplescomes in and then add the values from the five tuples to the aggregateof tuples being stored in the window. In window customization DP3, whichmay also be referred to as the holding operation, the stream operatormay delay calculations on the tuples it holds in the window for a setperiod time. For example, the stream operator may add the values fromthe tuples stored in the window every hour (assuming it is not requiredto produce output during that hour). Metadata tags may direct acompiler, i.e., compiler 136, to generate stream operators that performthe addition operation according to window customizations DP1, DP2, orDP3.

The present disclosure may be directed to a compiler, i.e., compiler136, that may be capable of alleviating bottlenecks in a streamingapplication by generating customized stream operators that areconfigured to support window processing operations, to perform theirprocessing operations in certain way and/or at a certain time, directedby metadata tags

Turning now to the figures, FIG. 1 illustrates a computinginfrastructure 100 that may be configured to execute a stream-basedcomputing application, according to some embodiments. The computinginfrastructure 100 includes a management system 105 and two or morecompute nodes 110A-110D—i.e., hosts—which are communicatively coupled toeach other using one or more communications networks 120. Thecommunications network 120 may include one or more servers, networks, ordatabases, and may use a particular communication protocol to transferdata between the compute nodes 110A-110D. A compiler system 102 may becommunicatively coupled with the management system 105 and the computenodes 110 either directly or via the communications network 120.

The management system 105 can control the management of the computenodes 110A-110D (discussed further on FIG. 3). The management system 105can have an operator graph 132 with one or more stream operators and astream manager 134 to control the management of the stream of tuples inthe operator graph 132.

The communications network 120 may include a variety of types ofphysical communication channels or “links.” The links may be wired,wireless, optical, or any other suitable media. In addition, thecommunications network 120 may include a variety of network hardware andsoftware for performing routing, switching, and other functions, such asrouters, switches, or bridges. The communications network 120 may bededicated for use by a stream computing application or shared with otherapplications and users. The communications network 120 may be any size.For example, the communications network 120 may include a single localarea network or a wide area network spanning a large geographical area,such as the Internet. The links may provide different levels ofbandwidth or capacity to transfer data at a particular rate. Thebandwidth that a particular link provides may vary depending on avariety of factors, including the type of communication media andwhether particular network hardware or software is functioning correctlyor at full capacity. In addition, the bandwidth that a particular linkprovides to a stream computing application may vary if the link isshared with other applications and users. The available bandwidth mayvary depending on the load placed on the link by the other applicationsand users. The bandwidth that a particular link provides may also varydepending on a temporal factor, such as time of day, day of week, day ofmonth, or season.

FIG. 2 is a more detailed view of a compute node 110, which may be thesame as one of the compute nodes 110A-110D of FIG. 1, according tovarious embodiments. The compute node 110 may include, withoutlimitation, one or more processors (CPUs) 205, a network interface 215,an interconnect 220, a memory 225, and a storage 230. The compute node110 may also include an I/O device interface 210 used to connect I/Odevices 212, e.g., keyboard, display, and mouse devices, to the computenode 110.

Each CPU 205 retrieves and executes programming instructions stored inthe memory 225 or storage 230. Similarly, the CPU 205 stores andretrieves application data residing in the memory 225. The interconnect220 is used to transmit programming instructions and application databetween each CPU 205, I/O device interface 210, storage 230, networkinterface 215, and memory 225. The interconnect 220 may be one or morebusses. The CPUs 205 may be a single CPU, multiple CPUs, or a single CPUhaving multiple processing cores in various embodiments. In oneembodiment, a processor 205 may be a digital signal processor (DSP). Oneor more processing elements 235 (described below) may be stored in thememory 225. A processing element 235 may include one or more streamoperators 240 (described below). In one embodiment, a processing element235 is assigned to be executed by only one CPU 205, although in otherembodiments the stream operators 240 of a processing element 235 mayinclude one or more threads that are executed on two or more CPUs 205.The memory 225 is generally included to be representative of a randomaccess memory, e.g., Static Random Access Memory (SRAM), Dynamic RandomAccess Memory (DRAM), or Flash. The storage 230 is generally included tobe representative of a non-volatile memory, such as a hard disk drive,solid state device (SSD), or removable memory cards, optical storage,flash memory devices, network attached storage (NAS), or connections tostorage area network (SAN) devices, or other devices that may storenon-volatile data. The network interface 215 is configured to transmitdata via the communications network 120.

A streams application may include one or more stream operators 240 thatmay be compiled into a “processing element” container 235. The memory225 may include two or more processing elements 235, each processingelement having one or more stream operators 240. Each stream operator240 may include a portion of code that processes tuples flowing into aprocessing element and outputs tuples to other stream operators 240 inthe same processing element, in other processing elements, or in boththe same and other processing elements in a stream computingapplication. Processing elements 235 may pass tuples to other processingelements that are on the same compute node 110 or on other compute nodesthat are accessible via communications network 120. For example, aprocessing element 235 on compute node 110A may output tuples to aprocessing element 235 on compute node 110B.

The storage 230 may include a buffer 260. Although shown as being instorage, the buffer 260 may be located in the memory 225 of the computenode 110 or in a combination of both memories. Moreover, storage 230 mayinclude storage space that is external to the compute node 110, such asin a cloud.

FIG. 3 is a more detailed view of the management system 105 of FIG. 1according to some embodiments. The management system 105 may include,without limitation, one or more processors (CPUs) 305, a networkinterface 315, an interconnect 320, a memory 325, and a storage 330. Themanagement system 105 may also include an I/O device interface 310connecting I/O devices 312, e.g., keyboard, display, and mouse devices,to the management system 105.

Each CPU 305 retrieves and executes programming instructions stored inthe memory 325 or storage 330. Similarly, each CPU 305 stores andretrieves application data residing in the memory 325 or storage 330.The interconnect 320 is used to move data, such as programminginstructions and application data, between the CPU 305, I/O deviceinterface 310, storage unit 330, network interface 305, and memory 325.The interconnect 320 may be one or more busses. The CPUs 305 may be asingle CPU, multiple CPUs, or a single CPU having multiple processingcores in various embodiments. In one embodiment, a processor 305 may bea DSP. Memory 325 is generally included to be representative of a randomaccess memory, e.g., SRAM, DRAM, or Flash. The storage 330 is generallyincluded to be representative of a non-volatile memory, such as a harddisk drive, solid state device (SSD), removable memory cards, opticalstorage, flash memory devices, network attached storage (NAS),connections to storage area-network (SAN) devices, or the cloud. Thenetwork interface 315 is configured to transmit data via thecommunications network 120.

The memory 325 may store a stream manager 134. Additionally, the storage330 may store an operator graph 335. The operator graph 335 may definehow tuples are routed to processing elements 235 (FIG. 2) forprocessing. The stream manager 134 may contain a monitor 340. Themonitor 340 may examine the operator graph 132 to determine the amountof data being buffered on a stream operator. The monitor 340 may be apart of the stream manager 134 or act independently.

FIG. 4 is a more detailed view of the compiler system 102 of FIG. 1according to some embodiments. The compiler system 102 may include,without limitation, one or more processors (CPUs) 405, a networkinterface 415, an interconnect 420, a memory 425, and storage 430. Thecompiler system 102 may also include an I/O device interface 410connecting I/O devices 412, e.g., keyboard, display, and mouse devices,to the compiler system 102.

Each CPU 405 retrieves and executes programming instructions stored inthe memory 425 or storage 430. Similarly, each CPU 405 stores andretrieves application data residing in the memory 425 or storage 430.The interconnect 420 is used to move data, such as programminginstructions and application data, between the CPU 405, I/O deviceinterface 410, storage unit 430, network interface 415, and memory 425.The interconnect 420 may be one or more busses. The CPUs 405 may be asingle CPU, multiple CPUs, or a single CPU having multiple processingcores in various embodiments. In one embodiment, a processor 405 may bea DSP. Memory 425 is generally included to be representative of a randomaccess memory, e.g., SRAM, DRAM, or Flash. The storage 430 is generallyincluded to be representative of a non-volatile memory, such as a harddisk drive, solid state device (SSD), removable memory cards, opticalstorage, flash memory devices, network attached storage (NAS),connections to storage area-network (SAN) devices, or to the cloud. Thenetwork interface 415 is configured to transmit data via thecommunications network 120.

The memory 425 may store a compiler 136. The compiler 136 compilesmodules, which include source code or statements, into the object code,which includes machine instructions that execute on a processor. In oneembodiment, the compiler 136 may translate the modules into anintermediate form before translating the intermediate form into objectcode. The compiler 136 may output a set of deployable artifacts that mayinclude a set of processing elements and an application descriptionlanguage file (ADL file), which is a configuration file that describesthe streaming application. In some embodiments, the compiler 136 may bea just-in-time compiler that executes as part of an interpreter. Inother embodiments, the compiler 136 may be an optimizing compiler. Invarious embodiments, the compiler 136 may perform peepholeoptimizations, local optimizations, loop optimizations, inter-proceduralor whole-program optimizations, machine code optimizations, or any otheroptimizations that reduce the amount of time required to execute theobject code, to reduce the amount of memory required to execute theobject code, or both. The output of the compiler 136 may be representedby an operator graph, e.g., the operator graph 335.

In various embodiments, the compiler 136 can include the windowprocessing operation on a particular stream operator on the operatorgraph 335 during compile time by writing the window processing operationonto a particular stream operator. In various embodiments, the windowprocessing operation may be included as a default and activated from thestream manager 134. The window processing operation may also be includedas an optional feature for a particular stream operator and may beactivated by the application.

The compiler 136 may also provide the application administrator with theability to optimize performance through profile-driven fusionoptimization. Fusing operators may improve performance by reducing thenumber of calls to a transport. While fusing stream operators mayprovide faster communication between operators than is available usinginter-process communication techniques, any decision to fuse operatorsrequires balancing the benefits of distributing processing acrossmultiple compute nodes with the benefit of faster inter-operatorcommunications. The compiler 136 may automate the fusion process todetermine how to best fuse the operators to be hosted by one or moreprocessing elements, while respecting user-specified constraints. Thismay be a two-step process, including compiling the application in aprofiling mode and running the application, then re-compiling and usingthe optimizer during this subsequent compilation. The end result may,however, be a compiler-supplied deployable application with an optimizedapplication configuration.

FIG. 5 illustrates an exemplary operator graph 500 for a streamcomputing application beginning from one or more sources 135 through toone or more sinks 504, 506, according to some embodiments. This flowfrom source to sink may also be generally referred to herein as anexecution path. Although FIG. 5 is abstracted to show connectedprocessing elements PE1-PE10, the operator graph 500 may include dataflows between stream operators 240 (FIG. 2) within the same or differentprocessing elements. Typically, processing elements, such as processingelement 235 (FIG. 2), receive tuples from the stream as well as outputtuples into the stream (except for a sink—where the stream terminates,or a source—where the stream begins).

The example operator graph shown in FIG. 5 includes ten processingelements (labeled as PE1-PE12) running on the compute nodes 110A-110E. Aprocessing element may include one or more stream operators fusedtogether to form an independently running process with its own processID (PID) and memory space. In cases where two (or more) processingelements are running independently, inter-process communication mayoccur using a “transport,” e.g., a network socket, a TCP/IP socket, orshared memory. However, when stream operators are fused together, thefused stream operators can use more rapid communication techniques forpassing tuples among stream operators in each processing element.

The operator graph 500 begins at a source 135 and ends at a sink 504,506. Compute node 110A includes the processing elements PE1, PE2, andPE3. Source 135 flows into the processing element PE1, which in turnoutputs tuples that are received by PE2 and PE3. For example, PE1 maysplit data attributes received in a tuple and pass some data attributesin a new tuple to PE2, while passing other data attributes in anothernew tuple to PE3. As a second example, PE1 may pass some received tuplesto PE2 while passing other tuples to PE3. Data that flows to PE2 isprocessed by the stream operators contained in PE2, and the resultingtuples are then output to PE4 on compute node 110B Likewise, the tuplesoutput by PE4 flow to operator sink PE6 504. Similarly, tuples flowingfrom PE3 to PE5 also reach the operators in sink PE6 504. Thus, inaddition to being a sink for this example operator graph, PE6 could beconfigured to perform a join operation, combining tuples received fromPE4 and PE5. This example operator graph also shows tuples flowing fromPE3 to PE7 on compute node 110C, which itself shows tuples flowing toPE8 and looping back to PE7. Tuples output from PE8 flow to PE9 oncompute node 110D, which in turn outputs tuples to be processed byoperators in a sink processing element, for example PE10 506.

The tuple received by a particular processing element 235 (FIG. 2) isgenerally not considered to be the same tuple that is output downstream.Typically, the output tuple is changed in some way. An attribute ormetadata may be added, deleted, or changed. However, it is not requiredthat the output tuple be changed in some way. Generally, a particulartuple output by a processing element may not be considered to be thesame tuple as a corresponding input tuple even if the input tuple is notchanged by the processing element. However, to simplify the presentdescription and the claims, an output tuple that has the same dataattributes as a corresponding input tuple may be referred to herein asthe same tuple.

Processing elements 235 (FIG. 2) may be configured to receive or outputtuples in various formats, e.g., the processing elements or streamoperators could exchange data marked up as XML documents. Furthermore,each stream operator 240 within a processing element 235 may beconfigured to carry out any form of data processing functions onreceived tuples, including, for example, writing to database tables orperforming other database operations such as data joins, splits, reads,etc., as well as performing other data analytic functions or operations.

The stream manager 134 of FIG. 1 may be configured to monitor a streamcomputing application running on compute nodes, e.g., compute nodes110A-110D, as well as to change the deployment of an operator graph,e.g., operator graph 132. The stream manager 134 may move processingelements from one compute node 110 to another, for example, to managethe processing loads of the compute nodes 110A-110D in the computinginfrastructure 100. Further, stream manager 134 may control the streamcomputing application by inserting, removing, fusing, un-fusing, orotherwise modifying the processing elements and stream operators (orwhat tuples flow to the processing elements) running on the computenodes 110A-110D.

Because a processing element may be a collection of fused streamoperators, it is equally correct to describe the operator graph as oneor more execution paths between specific stream operators, which mayinclude execution paths to different stream operators within the sameprocessing element. FIG. 5 illustrates execution paths betweenprocessing elements for the sake of clarity.

FIG. 6 illustrates a method 600 of initializing a streaming applicationthat has metadata tags for operational options for stream operators,consistent with embodiments of the present disclosure. In operation 602,a source code for a streaming application may be received. The sourcecode may encompass metadata tags included through the use of additionalstatements in the source code, annotations to the source code,configuration files that reference the source code, etc. Furthermore,the source code may include an operator graph that may have a pluralityof processing elements and each processing element may have one or morestream operators. The streaming application may be executed on one ormore compute nodes. Each compute node may have one or more CPU's. EachCPU may have a capacity that may be limiting to the number of streamoperators that may run on a compute node simultaneously.

In operation 604, metadata tags, from the source code, may be parsed.The parsing may occur prior to or during compilation of the operatorgraph. A metadata tag may direct a compiler to generator customizedbehaviors for stream operators that support a window processingoperation. For example, a metadata tag may direct a compiler to generatea stream operator, which supports a window processing operation, toperform its processing operation using window customization DP1. Compiletime directives may include delaying operations until an amount oftuples have been received, delaying operations for an amount of time,delaying operations until a change in an attribute of the tuples occurs,delaying operations until a number of punctuations are received,delaying operations until dynamic connections in the operator graph areestablished, delaying operations until an amount of the tuples havestreamed through a portion of the operator graph, etc. Furthermore, ametadata tag may also direct a compiler to generate a stream operatorhaving a customized run-time behavior to perform operations such aspartitioning, sorting, aggregating, etc.

A metadata tag may also direct a compiler to generate a stream operatorthat supports a first customized behavior at a first time or firstsituation and a second customized behavior at a second time or secondsituation. For example, the metadata tag may direct a compiler togenerate a stream operator to perform an addition operation using windowcustomization DP1 between 9 a.m. and 10 a.m. and perform the additionoperation using window customization DP2 between 11 a.m. and 12 p.m.Furthermore, the customization of the stream operator may be dependentupon the CPU capacity of the compute nodes on which the streamingapplication is executed. For example, a metadata tag may direct acompiler to generate a stream operator to perform an addition operationusing window customization DP2 when the CPU is at a threshold value andperform the addition operator using window customization DP1 when theCPU is below the threshold value.

In operation 606, the source code of the streaming application thatincludes metadata tags for enabling a customized run-time behavior of astream operator that support window processing operations, may becompiled. This may alleviate bottlenecks in the streaming applicationand adhere to the CPU capacities on the compute nodes.

In the foregoing, reference is made to various embodiments. It should beunderstood, however, that this disclosure is not limited to thespecifically described embodiments. Instead, any combination of thedescribed features and elements, whether related to differentembodiments or not, is contemplated to implement and practice thisdisclosure. Furthermore, although embodiments of this disclosure mayachieve advantages over other possible solutions or over the prior art,whether or not a particular advantage is achieved by a given embodimentis not limiting of this disclosure. Thus, the described aspects,features, embodiments, and advantages are merely illustrative and arenot considered elements or limitations of the appended claims exceptwhere explicitly recited in a claim(s).

As will be appreciated by one skilled in the art, aspects of the presentdisclosure may be embodied as a system, method, or computer programproduct. Accordingly, aspects of the present disclosure may take theform of an entirely hardware embodiment, an entirely software embodiment(including firmware, resident software, micro-code, etc.), or anembodiment combining software and hardware aspects that may allgenerally be referred to herein as a “circuit,” “module,” or “system.”Furthermore, aspects of the present disclosure may take the form of acomputer program product embodied in one or more computer readablemedium(s) having computer readable program code embodied thereon.

Any combination of one or more computer readable medium(s) may beutilized. The computer readable medium may be a computer readable signalmedium or a computer readable storage medium. A computer readablestorage medium may be, for example, but not limited to, an electronic,magnetic, optical, electromagnetic, infrared, or semiconductor system,apparatus, or device, or any suitable combination thereof. More specificexamples (a non-exhaustive list) of the computer readable storage mediumwould include the following: an electrical connection having one or morewires, a portable computer diskette, a hard disk, a random access memory(RAM), a read-only memory (ROM), an erasable programmable read-onlymemory (EPROM or Flash memory), an optical fiber, a portable compactdisc read-only memory (CD-ROM), an optical storage device, a magneticstorage device, or any suitable combination thereof. In the context ofthis disclosure, a computer readable storage medium may be any tangiblemedium that can contain, or store, a program for use by or in connectionwith an instruction execution system, apparatus, or device.

A computer readable signal medium may include a propagated data signalwith computer readable program code embodied therein, for example, inbaseband or as part of a carrier wave. Such a propagated signal may takeany of a variety of forms, including, but not limited to,electro-magnetic, optical, or any suitable combination thereof. Acomputer readable signal medium may be any computer readable medium thatis not a computer readable storage medium and that can communicate,propagate, or transport a program for use by or in connection with aninstruction execution system, apparatus, or device.

Program code embodied on a computer readable medium may be transmittedusing any appropriate medium, including but not limited to wireless,wire line, optical fiber cable, RF, etc., or any suitable combinationthereof.

Computer program code for carrying out operations for aspects of thepresent disclosure may be written in any combination of one or moreprogramming languages, including: (a) an object oriented programminglanguage such as Java, Smalltalk, C++, or the like; (b) conventionalprocedural programming languages, such as the “C” programming languageor similar programming languages; and (c) a streams programminglanguage, such as IBM Streams Processing Language (SPL). The programcode may execute as specifically described herein. In addition, theprogram code may execute entirely on the user's computer, partly on theuser's computer, as a stand-alone software package, partly on the user'scomputer and partly on a remote computer, or entirely on the remotecomputer or server. In the latter scenario, the remote computer may beconnected to the user's computer through any type of network, includinga local area network (LAN) or a wide area network (WAN), or theconnection may be made to an external computer (for example, through theInternet using an Internet Service Provider).

Aspects of the present disclosure have been described with reference toflowchart illustrations, block diagrams, or both, of methods,apparatuses (systems), and computer program products according toembodiments of this disclosure. It will be understood that each block ofthe flowchart illustrations or block diagrams, and combinations ofblocks in the flowchart illustrations or block diagrams, can beimplemented by computer program instructions. These computer programinstructions may be provided to a processor of a general purposecomputer, special purpose computer, or other programmable dataprocessing apparatus to produce a machine, such that the instructions,which execute via the processor of the computer or other programmabledata processing apparatus, create means for implementing the functionsor acts specified in the flowchart or block diagram block or blocks.

These computer program instructions may also be stored in a computerreadable medium that can direct a computer, other programmable dataprocessing apparatus, or other devices to function in a particularmanner, such that the instructions stored in the computer readablemedium produce an article of manufacture including instructions whichimplement the function or act specified in the flowchart or blockdiagram block or blocks.

The computer program instructions may also be loaded onto a computer,other programmable data processing apparatus, or other devices to causea series of operational steps to be performed on the computer, otherprogrammable apparatus, or other devices to produce a computerimplemented process such that the instructions which execute on thecomputer or other programmable apparatus provide processes forimplementing the functions or acts specified in the flowchart or blockdiagram block or blocks.

Embodiments according to this disclosure may be provided to end-usersthrough a cloud-computing infrastructure. Cloud computing generallyrefers to the provision of scalable computing resources as a serviceover a network. More formally, cloud computing may be defined as acomputing capability that provides an abstraction between the computingresource and its underlying technical architecture (e.g., servers,storage, networks), enabling convenient, on-demand network access to ashared pool of configurable computing resources that can be rapidlyprovisioned and released with minimal management effort or serviceprovider interaction. Thus, cloud computing allows a user to accessvirtual computing resources (e.g., storage, data, applications, and evencomplete virtualized computing systems) in “the cloud,” without regardfor the underlying physical systems (or locations of those systems) usedto provide the computing resources.

Typically, cloud-computing resources are provided to a user on apay-per-use basis, where users are charged only for the computingresources actually used (e.g., an amount of storage space used by a useror a number of virtualized systems instantiated by the user). A user canaccess any of the resources that reside in the cloud at any time, andfrom anywhere across the Internet. In context of the present disclosure,a user may access applications or related data available in the cloud.For example, the nodes used to create a stream computing application maybe virtual machines hosted by a cloud service provider. Doing so allowsa user to access this information from any computing system attached toa network connected to the cloud (e.g., the Internet).

The flowchart and block diagrams in the figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present disclosure. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof code, which comprises one or more executable instructions forimplementing the specified logical function(s). It should also be notedthat, in some alternative implementations, the functions noted in theblock may occur out of the order noted in the figures. For example, twoblocks shown in succession may, in fact, be executed substantiallyconcurrently, or the blocks may sometimes be executed in the reverseorder, depending upon the functionality involved. It will also be notedthat each block of the block diagrams or flowchart illustration, andcombinations of blocks in the block diagrams or flowchart illustration,can be implemented by special purpose hardware-based systems thatperform the specified functions or acts, or combinations of specialpurpose hardware and computer instructions.

Although embodiments are described within the context of a streamcomputing application, this is not the only context relevant to thepresent disclosure. Instead, such a description is without limitationand is for illustrative purposes only. Additional embodiments may beconfigured to operate with any computer system or application capable ofperforming the functions described herein. For example, embodiments maybe configured to operate in a clustered environment with a standarddatabase processing application. A multi-nodal environment may operatein a manner that effectively processes a stream of tuples. For example,some embodiments may include a large database system, and a query of thedatabase system may return results in a manner similar to a stream ofdata.

While the foregoing is directed to exemplary embodiments, other andfurther embodiments of the disclosure may be devised without departingfrom the basic scope thereof, and the scope thereof is determined by theclaims that follow.

1. A method of initializing a streaming application, the methodcomprising: receiving a source code that includes an operator graph, theoperator graph including a plurality of processing elements forexecuting the streaming application, each processing element having oneor more stream operators, wherein the streaming application is executedon one or more compute nodes, and wherein each compute node is adaptedto execute the one or more stream operators; parsing, from the sourcecode, a metadata tag describing a customization of at least one of theone or more stream operators having a windowing processing operation,wherein the customization is a delay operation within the windowingprocessing operation, wherein the customization changes from a firstcustomization to a second customization in response to a change incentral processing unit capacity on the one or more compute nodes,wherein the windowing procession operation includes one or more windows,and wherein the one or more windows are a logical container for tuplesreceived by an input port of one of the one or more stream operators;and compiling the source code of the streaming application having thewindowing processing operation, based on the metadata tag.
 2. (canceled)3. The method of claim 1, wherein the delay operation is designed todelay a stream operator from operating, based on a criterion that isselected from the group consisting of: an amount of received tuples, anamount of elapsed time, a change in an attribute of the tuples,receiving a number of punctuations, establishing dynamic connections inthe operator graph, and an amount of the tuples that have streamedthrough a portion of the operator graph.
 4. The method of claim 1,wherein a second processing operation to be performed within thewindowing processing operation is also based on the metadata tag.
 5. Themethod of claim 4, wherein the second processing operation is one ofpartitioning, sorting, and aggregating.
 6. The method of claim 1,wherein the customization changes from a first customization to a secondcustomization in response to a change in time.
 7. (canceled)
 8. Themethod of claim 1, wherein the metadata tag is a keyword assigned to apiece of an information artifact.
 9. The method of claim 8, wherein theinformation artifact is a stream operator.
 10. The method of claim 1,wherein the one or more stream operators include a customized run-timebehavior to perform an operation.
 11. The method of claim 10, whereinthe operation is selected from the group consisting of: partitioning,sorting, and aggregating.
 12. The method of claim 1, wherein the one ormore stream operators are fused together to form an executableprocessing element.